<?php

/* Addendum library inclusions */
require 'lib/addendum/annotations.php';

/* pChart library inclusions */
include('lib/pChart/class/pData.class.php');
include('lib/pChart/class/pDraw.class.php');
include('lib/pChart/class/pImage.class.php');

// Autoloader for other classes
function dumbAutoloader($classname)
{
    $lcClassname = strtolower($classname);
    
    $it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__));

    foreach($it as $path)
    {
        if($path->isFile())
        {
            $filename = $path->getBasename('.php');
            if($filename == $classname || $filename == $lcClassname)
            {
                include $path->getPathname();
            }
        }
    }
            
}


spl_autoload_register('dumbAutoloader');